
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
    <title>教学产品-客户测评</title>
    <meta content="Admin Dashboard" name="description" />
    <meta content="Mannatthemes" name="author" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <link href="/common/assets/css/bootstrap.min.css" rel="stylesheet" type="text/css">
    <link href="/common/assets/css/icons.css" rel="stylesheet" type="text/css">
    <link href="/common/assets/css/style.css" rel="stylesheet" type="text/css">

</head>
<body>
<!-- Begin page -->
<div class="accountbg"></div>
<div class="wrapper-page">
    <div class="card">
        <div class="card-body">

            <div class="p-3">
                <form id="f1" class="form-horizontal m-t-20">

                    <div class="form-group row">
                        <div class="col-12">
                            <input class="form-control" type="text" required="" placeholder="Username" name="username">
                        </div>
                    </div>

                    <div class="form-group row">
                        <div class="col-12">
                            <input class="form-control" type="password" required="" placeholder="Password" name="pwd">
                        </div>
                    </div>

                    <div class="form-group text-center row m-t-20">
                        <div class="col-12">
                            <button id="submitBtn" class="btn btn-danger btn-block waves-effect waves-light" type="button">Log In</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<form id="f2" action="/com/imelite/qyh/EliteView_YyxxAction/yyxxByTelPage.do" method="post">
    <input id="iddep" type="hidden" name="iddep">
</form>

<!-- jQuery  -->
<script src="/common/assets/js/jquery.min.js"></script>
<script src="/common/assets/js/popper.min.js"></script>
<script src="/common/assets/js/bootstrap.min.js"></script>
<script src="/common/assets/js/modernizr.min.js"></script>
<script src="/common/assets/js/waves.js"></script>
<script src="/common/assets/js/jquery.slimscroll.js"></script>
<script src="/common/assets/js/jquery.nicescroll.js"></script>
<script src="/common/assets/js/jquery.scrollTo.min.js"></script>
<!-- App js -->
<script src="/common/assets/js/app.js"></script>
<script>
    $('#submitBtn').click(function(){
        $.ajax({
            type: "POST",
            data:$('#f1').serialize(),
            url: "/com/imelite/qyh/UserAction/getUserByLogin.do",
            success: function(result) {
                if ( result.code == 200 ) {
                    $('#iddep').val(result.msg);
                    $('#f2').submit();
                } else {
                    alert(result.msg);
                }
            },
            error:function(data){
                alert("系统异常！");
            }
        });
    });
</script>

</body>
</html>